package com.lbd.loan.service;

import com.lbd.base.service.BaseService;
import com.lbd.loan.bean.Loan;

import java.util.List;

/**
 * Created by wang on 2016/9/22.
 */
public interface LoanService extends BaseService<Loan> {
    /**
     * 1. 贷款申请保存
     *
     * @param loan 贷款bean
     * @return
     */
    int loanApply(Loan loan);

    /**
     * 2. 根据手机号查询贷款申请
     *
     * @param telephone 手机号
     * @return
     */
    List<Loan> findLoanByMobile(String telephone);

    /**
     * 3. 根据姓名及手机号查找贷款申请
     *
     * @param name      姓名
     * @param telephone 电话
     * @return
     */
    List<Loan> findLoanByNameAndMobile(String name, String telephone);

    /**
     * 4. 根据贷款实体传入条件查询贷款申请
     *
     * @param loan 贷款bean
     * @return
     */
    List<Loan> findAll(Loan loan);

    /**
     * 5. 根据Id查询贷款申请
     *
     * @param id 贷款id
     * @return
     */
    Loan findById(String id);


}
